Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

247
Visualizações
Is there anyway to apply letter and word spacing to a "font" using css?

I have a custom font with code like this -

@font-face {
font-family: 'classylight';
url : 'some path';
font-weight:normal;
    }

I want to set some values exclusively for this font everywhere on the site like letter spacing, word spacing, and other styles. I wanted to reduce unneccessary process, and looked for attribute=style property.

I tried -

body [style="font-family:classylight"] {
letter-spacing:50px;
word-spacing:-20px; 
}

It's not working. Can anyone help? I would like to use only css for this. If there's no possibility in css, please refer with javascript, jquery.

PS - I'm not looking for answers which adds styles directly to body part like

p {
font-family: classylight;
letter-spacing:50px;
word-spacing:-20px; 
    } 
about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

Unike text color and size, You can't change letter spacing and word spacing using attribute=style property. You should either change them while creating by changing pen width or you should change them in body of css.

about 4 years ago · Juan Pablo Isaza Relatório

0

Use rem and em for all the letter spacing, word spacing, etc. And for the font-weight, it is because the initial declaration is overwriting your own font-weight.

about 4 years ago · Juan Pablo Isaza Relatório

0

you might find this useful i guess.. this are the common most use css text property

<h1 style="

text-align: center; 
font-size: 25px;  
color:#FF0000;      
font-family: Arial Black,Arial,Helvetica,Verdana,Trebuchet MS,Comic Sans MS,sans-serif;    
font-style: normal;   
font-weight: 1000;
background-color: #D3D3D3; 
line-height: 3;

">TEST 123</h1>

also about your question "font-weight:bold" not working perhaps it being overwritten by other value such as < h1 > which make text already huge...

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda